package com.sunmoon.mingshuo.view.fragment

import android.databinding.DataBindingUtil
import android.databinding.ViewDataBinding
import android.os.Bundle
import android.support.v4.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup

abstract class BaseFragment<b : ViewDataBinding> : Fragment() {
    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
        var b = DataBindingUtil.inflate<b>(inflater, setLayoutID(), container,false)
        return b.root
    }
    abstract fun setLayoutID():Int
}